package processes.createThreadsProcess;

import os.MiniOS;
import os.MiniProcess;
import os.MiniThread;

public class CreateThreadsProcessMainThread extends MiniThread
{

	public CreateThreadsProcessMainThread(MiniProcess process, String tid)
	{
		super(process, tid);
		description = "Main Thread";
	}

	@Override
	public void run()
	{
		isExcecutionStopped();
		MiniOS.getInstance().createThread(getProcessId(),
				"processes.createThreadsProcess.CreateThreadsProcessThread1",
				null).start();
		isExcecutionStopped();
		MiniOS.getInstance().createThread(getProcessId(),
				"processes.createThreadsProcess.CreateThreadsProcessThread2",
				null).start();
		isExcecutionStopped();
		MiniOS.getInstance().createThread(getProcessId(),
				"processes.createThreadsProcess.CreateThreadsProcessThread3",
				null).start();
		isExcecutionStopped();
		MiniOS.getInstance().threadTerminated(getProcessId(), getTid());
	}

	@Override
	public void passThreadArguments(Object[] arguments)
	{

	}

}
